#include "cell.h"
#include <algorithm>


namespace ATSudokuEngine
{

bool Cell::operator == (UInt32 nIndex) const
{
	return nIndex_ == nIndex;
}

bool Cell::operator == (const Cell& aCell) const
{
	return nIndex_ == aCell;
}

bool Cell::operator == (const Cell* pCell) const
{
	return nIndex_ == *pCell;
}

Cell::operator UInt32() const
{
	return nIndex_;
}

UInt32 Cell::Index() const
{
	return nIndex_;
}

UInt32 Cell::Value(UInt32 nValue) const
{
	UInt32 nTemp = nValue_;
	nValue_ = nValue;
	return nTemp;
}

UInt32 Cell::Value() const
{
	return nValue_;
}

void Cell::SetCandidate(const Candidate& aCandidate) const
{
	aCandidate_ = aCandidate;
}

CandidateConstIterator Cell::BeginCandidates() const
{
	return aCandidate_.BeginCandidates();
}

CandidateConstIterator Cell::EndCandidates() const
{
	return aCandidate_.EndCandidates();
}

}	// namespace ATSudokuEngine